import { request } from '@/utils/request.js'
export const getGoodsList = () => {
  return request('goods/selectAllGoods', 'get')
}
// 根据名字获取goods
export const nameForGoods = data => {
  return request('/goods/selectGoodsByName', 'get', data)
}
// 根据id获取goods/goods/selectGoodsById
// export const goodsById = data => {
//   return request('/goods/selectGoodsByIdWithStore', 'get', data)
// }
// 根据id获取goods/goods/selectGoodsById
export const goodsById = data => {
  return request('/goods/selectGoodsById', 'get', data)
}
// 根据id获取goods评论列表
export const goodsCommentsList = data => {
  return request('/comments/selectCommentsbyGoodsId', 'get', data)
}

// 商品添加评论
export const publishComments = data => {
  return request('/comments/addComments', 'get', data)
}

// 商品添加到购物车
export const addToShopcart = data => {
  return request('/cart/toShoppingCart', 'get', data)
}
